package com.wlb365.financing.modules.sys.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wlb365.financing.modules.sys.entity.Role;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface RoleMapper extends BaseMapper<Role> {

    List<Role> selectRoleList(Role role, Page page);

    /**
     * 根据用户ID查询角色列表.
     * @param userId 用户ID.
     * @return 用户角色列表
     */
    List<Role> getUserRoles(@Param("userId") String userId);

}
